# Contributor: Bart Ribbers <bribbers@disroot.org>
# Maintainer: Bart Ribbers <bribbers@disroot.org>
pkgname=android-translation-layer
pkgver=0_git20241005
pkgrel=0
_commit="21a75d7ff0cfbe8627b2413d1a7481f86409df3f"
pkgdesc="A translation layer for running Android apps on a Linux system"
url="https://gitlab.com/android_translation_layer/android_translation_layer"
arch="x86_64 aarch64 armv7"
license="GPL-3.0-only"
# libopensles-standalone is not strictly required but some Android applications depend on it
depends="libopensles-standalone"
makedepends="
	alsa-lib-dev
	bionic_translation-dev
	art_standalone-dev
	ffmpeg-dev
	glib-dev
	gtk4.0-dev
	java-common
	libgudev-dev
	libportal-dev
	meson
	openjdk8-jdk
	openxr-dev
	skia-sharp-dev
	vulkan-loader-dev
	webkit2gtk-6.0-dev
	"
subpackages="$pkgname-dbg"
source="https://gitlab.com/mis012/android_translation_layer/-/archive/$_commit/android_translation_layer-$_commit.tar.gz"
builddir="$srcdir/android_translation_layer-$_commit"

build() {
	abuild-meson \
		. output
	meson compile -C output
}

check() {
	meson test --no-rebuild --print-errorlogs -C output
}

package() {
	DESTDIR="$pkgdir" meson install --no-rebuild -C output
}

sha512sums="
709f3e018a259022f789a9b7167dfd156cceb929df3b239feb0e0448c3ebf9b3a0f28b79603446b099afcb054e95ecc97435a91f7b4781b0f3fae2be3de775ec  android_translation_layer-21a75d7ff0cfbe8627b2413d1a7481f86409df3f.tar.gz
"
